home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: delta / whiteline CD Series - delta.iso / tools / anwender / astrolog / timezone / timezone.eng < prev    next >
Encoding:
Text File  |  1995-11-25  |  3.2 KB  |  87 lines

  1.                       TimeZone 1.0 (September 7th, 1995)
  2.                                                            Abel PHILIPPE
  3.  
  4. This CPX allow to choose timezone and daylight time. With it help,
  5. Astrolog (or any other software) can find, from the internal clock, the
  6. GMT hour.
  7.  
  8. Install :
  9. -------
  10. Copy the file TIMEZONE.CPX in thz folder CPX of your BOOT partition. If
  11. you didn't have it, copy the file XCONTROL.ACC at the root of your
  12. BOOT partition.
  13. If you have an ATARI ST/F or an MEGA ST/F (and only this models, and not
  14. those who are younger than the STE), copy the file ACOOKIE.PRG in the
  15. AUTO folder of your partition. This one create a 'Cookie Jar' in the
  16. memory and install a particular reset routine.
  17.  
  18. Use :
  19. ---
  20. In France, we have one hour more on the GMT hour in winter, and two in
  21. summer. So, TIMEZONE.CPX must be set like that :
  22.  
  23. - click on the 'Time Zone' button : a menu is displaying. You must select,
  24. with arrows, the item 'Central European Time -1h'.
  25.  
  26. - Select 'Daylight Time' button in summer, and unselect it in winter.
  27.  
  28. - At the right of it, enter '-1h00' in the editable field. It is the
  29. difference between spring and winter time (daylight).
  30.  
  31. - Click on 'Save' to save yours settings.
  32.  
  33. At the change of time, you'll just have to click on the 'Daylight Time'
  34. button, and to set the internal clock. (I now : it would be nice that
  35. TimeZone allow to set the clock during the time change ! Maybe in the
  36. next version...).
  37.  
  38. Developper's note :
  39. TIMEZONE.CPX add a Cookie with this describe :
  40.  
  41.     identificator : 'ZONE'
  42.     
  43.     value : I consider this value like the one of two integers i and j :
  44.                 the high word for i, and low word for j.
  45.  
  46. Explanation :
  47.     i is the number of minutes that you have to substract to system's hour
  48.     to find GMT hour (the Universal Time in fact, but ...)
  49.     
  50.     j is the number of minutes that you have to substract to system's hour
  51.     to include the daylight time. Like that, in France, j must contain
  52.     -60 in summer, and 0 in winter.
  53.  
  54. I wrote this program because I need it for the use of the function time()
  55. of Pure C. It return the number of seconds since the 1-1-1970 at 0h00 GMT.
  56. It is based on the two global variables timezone and daylight. I suppose
  57. that timezone must contain the number of seconds to substract to the
  58. local hour to find the GMT hour, and daylight must contain 1 if there
  59. is one hour supplementary due to the daylight time. By default, timezone
  60. contain 3600 and daylight 0 (set for Germany ?) These two variables
  61. control time() and gmtime() but not localtime() (I think it's somewhat
  62. logical).
  63.  
  64. Here is how to use cookie value :
  65.  
  66.         timezone=-i*60;
  67.         daylight=-j/60;
  68.  
  69. I hope it will work in all cases. Nevertheless, it seems that in some
  70. countries, the difference between spring/summer would be not of one hour.
  71. I don't know what would be the reaction of Pure C, for daylight can only
  72. take int value. In all case, it is surely possible to find a solution
  73. with a good value for timezone.
  74.  
  75. Distribution :
  76. ------------
  77. TimeZone 1.0 is freeware. You can distribute it freely around you.
  78.  
  79. To contact me :
  80. -------------
  81.  
  82.                 abel@mathp7.jussieu.fr
  83.  
  84.         or        Abel PHILIPPE
  85.                 16 rue St Ferdinand
  86.                 75017 PARIS - FRANCE
  87.